<template>
	<div class="contentWrap">
		<h1>{{ min_content }}</h1>
		<p><<{{ title }}>></p>
		<p>{{ author }}</p>
		<el-button type="success" @click="show_poetry">换一句</el-button>
		<!-- <el-row>
			
		</el-row> -->
		
	</div>
</template>

<script>
	import $ from 'jquery'
	export default {
		data() {
			return {
				min_content: '',
				title: '',
				author: ''
			}
		},
		methods:{
			show_poetry() {
				$.ajax({
					url: 'https://api.muxiaoguo.cn/api/Gushici',
					data: {
						api_key: '07b936dd985cb883'
					},
					method: 'get'
				}).then(result => {
					this.min_content = result.data.min_content;
					this.title = result.data.title;
					this.author = result.data.author;
				})
			}
		},
		mounted() {
			this.show_poetry()
		}
	}
</script>

<style lang="scss">
	.contentWrap{
		text-align: center;
	}
</style>
